UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3HXdUKVSbj9VOi06Xj746DDIA+2lY2PM2Rv1NXHKMlg='
WHERE
key_id = 'b55fb8f76abb26a255e6ae6ab43e9828bdfbfddeda2d076b1c49bdb2cddfb90c'
AND (
token = '3HXdUKVSbj9VOi06Xj746DDIA+2lY2PM2Rv1NXHKMlg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)