UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EnHyhDvGk0KEuz/Ls1D2dg4S5mTotHwDqpVQNd2kbrU='
WHERE
key_id = '2862d41a8fe9970b6076120ef41b52579b0e46a51c17b7f9d0d4a58c58d72fa3'
AND (
token = 'EnHyhDvGk0KEuz/Ls1D2dg4S5mTotHwDqpVQNd2kbrU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)