UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'slJpiO8Uz4Wnzf5Iy8ijUhVTi2Llou7983Pxs9IB0fI='
WHERE
key_id = '37cb6db8ed313e13a6868189ab98358a9401109d46369edd818bec4116a814e8'
AND (
token = 'slJpiO8Uz4Wnzf5Iy8ijUhVTi2Llou7983Pxs9IB0fI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)