UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0u3/twYI9dhvh7NXoa+J7Z3NN3OASun3zNKtswg/844='
WHERE
key_id = 'f2bf36421ebaf968336096a891751ef85489b94445cda5d448e5749e8d6ff221'
AND (
token = '0u3/twYI9dhvh7NXoa+J7Z3NN3OASun3zNKtswg/844='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)