UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OpcXIdNnlAbQ6ybJsVv/MZ8zHPe/R05Rvcy3v3jTH1c='
WHERE
key_id = '1c5ea29969b4cdcb9e4d037f089d1f789d54d0700fa25fc4988e6f5834b7ce26'
AND (
token = 'OpcXIdNnlAbQ6ybJsVv/MZ8zHPe/R05Rvcy3v3jTH1c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)