UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'G3O6IL9QDNyGzwByvW/j+mDnEoXdidz8UJa72bWF1fY='
WHERE
key_id = 'e3b6873bba39bf816044f332c808922a44423e73907aef9cd30b74607519f0d0'
AND (
token = 'G3O6IL9QDNyGzwByvW/j+mDnEoXdidz8UJa72bWF1fY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)