UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dzTKfIcbuc9raFWRc581L/82Bpjoo/4/vO0ofDbzOvo='
WHERE
key_id = '1af459bec2ca8f5ca5d6b80ebd0c22708e4ef207d5754b3665bf11a42ae7b0f1'
AND (
token = 'dzTKfIcbuc9raFWRc581L/82Bpjoo/4/vO0ofDbzOvo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)