UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6eAPMOag0kPqt3PzSG062O/bLOwcOpYKZkP2hOltDjg='
WHERE
key_id = '4a8f1fbbb40c39edf5b95c8a21a2838ab8ff13819fe71bd6b958cc10277bae94'
AND (
token = '6eAPMOag0kPqt3PzSG062O/bLOwcOpYKZkP2hOltDjg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)