UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wFyuVWlSqobhkPDXhU/Bla2sp3OZwVemOwBmBUyK86A='
WHERE
key_id = '71ff143158a3d192323af336c694ab44cfefd4824b99d091e4d1361919054093'
AND (
token = 'wFyuVWlSqobhkPDXhU/Bla2sp3OZwVemOwBmBUyK86A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)